const path = require('path'); //引入path模块
function resolve(dir) {
    return path.join(__dirname, dir) //path.join(__dirname)设置绝对路径
}

module.exports = {
  devServer: {
    open: true
  },
  publicPath: "./", //打包后的位置(如果不设置这个静态资源会报404)
  outputDir: 'manager', //打包后的目录名称
  assetsDir: 'static', //静态资源目录名称
  chainWebpack: config => {
      config.resolve.alias // 添加别名
          .set("@", resolve("src"))
          .set("api", resolve("src/api"))
          .set("assets", resolve("src/assets"))
          .set("components", resolve("src/components"))
          .set("network", resolve("src/network"))
          .set("plugins", resolve("src/plugins"))
          .set("pages", resolve("src/pages"))
          .set("store", resolve("src/store"))
          .set("common", resolve("src/common"))
          .set("utils", resolve("src/utils"))
  },
  productionSourceMap: false
}